Skip to content

Conversation

@djhi
Copy link
Collaborator

@djhi djhi commented Dec 3, 2024

Problem

Fixes #10274

When entering a unknown value in an <AutocompleteInput> or <AutocompleteArrayInput> that supports creation, users have to click on the creation menu item. This is cumbersome as MUI <AutoComplete> supports creating items by pressing Enter

Solution

Properly handle the case in our onChange handler.

How To Test

Check any of the stories that supports creation, enter a new item and validate it with Enter. For instance:

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@djhi djhi added the WIP Work In Progress label Dec 3, 2024
@djhi djhi changed the title Improve AutocompleteInput creation support Fix: Improve AutocompleteInput creation support Dec 3, 2024
@djhi djhi added RFR Ready For Review and removed WIP Work In Progress labels Dec 3, 2024
@slax57 slax57 self-requested a review December 3, 2024 13:46
Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, but the solution is very elegant! Nice!

@slax57 slax57 added this to the 5.4.2 milestone Dec 3, 2024
@slax57 slax57 merged commit 8c814a4 into master Dec 3, 2024
13 checks passed
@slax57 slax57 deleted the improve-array-input-create-support branch December 3, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Development

Successfully merging this pull request may close these issues.

<AutocompleteArrayInput onCreate /> undefined value en enter

3 participants